/*
 * Copyright 2018 The kSAR Project. All rights reserved.
 * See the LICENSE file in the project root for more information.
 */

package net.atomique.ksar.ui;

import net.atomique.ksar.VersionNumber;

public class AboutBox extends javax.swing.JDialog {

  /**
   * Creates new form AboutBox
   */
  public AboutBox(java.awt.Frame parent) {
    super(parent);
    initComponents();
    setLocationRelativeTo(parent);
    setModal(true);
    setVisible(true);
  }

  /**
   * This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jPanel3 = new javax.swing.JPanel();
    versionlabel = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    urllabel = new javax.swing.JLabel();
    authorlabel = new javax.swing.JLabel();
    licencelabel = new javax.swing.JLabel();
    tipslabel = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    OkButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    getContentPane().setLayout(
        new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.PAGE_AXIS));

    jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

    versionlabel.setText("kSar version: " + VersionNumber.getVersionString());

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 357, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(0, 118, Short.MAX_VALUE)
                    .addComponent(versionlabel)
                    .addGap(0, 119, Short.MAX_VALUE)))
    );
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 16, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(versionlabel)
                    .addGap(0, 0, Short.MAX_VALUE)))
    );

    getContentPane().add(jPanel3);

    jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.PAGE_AXIS));

    urllabel.setText("website: http://sourceforge.net/projects/ksar/");
    jPanel2.add(urllabel);

    authorlabel.setText("Author: xavier cherif");
    jPanel2.add(authorlabel);

    licencelabel.setText("License: BSD (see LICENCE file)");
    jPanel2.add(licencelabel);

    tipslabel.setText("ARS LONGA, VITA BREVIS");
    jPanel2.add(tipslabel);

    getContentPane().add(jPanel2);

    OkButton.setText("Ok");
    OkButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        OkButtonActionPerformed(evt);
      }
    });
    jPanel1.add(OkButton);

    getContentPane().add(jPanel1);

    pack();
  } // </editor-fold>//GEN-END:initComponents

  private void OkButtonActionPerformed(
      java.awt.event.ActionEvent evt) { //GEN-FIRST:event_OkButtonActionPerformed
    setVisible(false);
    dispose();
  } //GEN-LAST:event_OkButtonActionPerformed


  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JButton OkButton;
  private javax.swing.JLabel authorlabel;
  private javax.swing.JPanel jPanel1;
  private javax.swing.JPanel jPanel2;
  private javax.swing.JPanel jPanel3;
  private javax.swing.JLabel licencelabel;
  private javax.swing.JLabel tipslabel;
  private javax.swing.JLabel urllabel;
  private javax.swing.JLabel versionlabel;
  // End of variables declaration//GEN-END:variables

}
